<?php

class NewsAction extends CommonAction {  

  //发贴
  public function issue(){   
  
	$user=M('News');
	$date['title']=$_POST['title'];
	$date['content']=$_POST['content'];	
    $date['isTrue']=0;	
	$date['updatetime']=date('Y-m-d H:i:s');
    $date['uname']=session('username');;	    // session中的'username'
	
	$lastid=$user->add($date);
	if($lastid){
		
		$this->success('提交成功，管理员审核通过后才能显示！'); 
	}else{
		$this->error('提交失败，请与管理员联系!');			
	} 	
	
    }
}
?>